﻿Imports GalaSoft.MvvmLight
Imports System.Collections.ObjectModel

Namespace ViewModel

    Public Class MainViewModel
        Inherits ViewModelBase

        ''' <summary>
        ''' Initializes a new instance of the MainViewModel class.
        ''' </summary>
        Public Sub New()
            ' Code runs in Blend --> create design time data.
            If IsInDesignMode Then
            Else

            End If
        End Sub


#Region "Properties"

        Public ReadOnly Property AddInItems As ObservableCollection(Of AddInItemViewModelBase)
            Get
                Dim list = New ObservableCollection(Of AddInItemViewModelBase)
                For Each item In _ViewerAddInItems
                    list.Add(item)
                Next
                For Each item In _SourceAddInItems
                    list.Add(item)
                Next
                Return list
            End Get
        End Property

        Private _SourceAddInItems As New ObservableCollection(Of SourceAddInViewModel)
        Public ReadOnly Property SourceAddInItems As ObservableCollection(Of SourceAddInViewModel)
            Get
                Return _SourceAddInItems
            End Get
        End Property

        Private _ViewerAddInItems As New ObservableCollection(Of DestinationAddInViewModel)
        Public ReadOnly Property DestinationAddInItems As ObservableCollection(Of DestinationAddInViewModel)
            Get
                Return _ViewerAddInItems
            End Get
        End Property

        Private _IsBusy As Boolean = True
        Property IsBusy As Boolean
            Get
                Return _IsBusy
            End Get
            Set(ByVal value As Boolean)
                If value <> _IsBusy Then
                    _IsBusy = value
                    RaisePropertyChanged("IsBusy")
                End If
            End Set
        End Property
#End Region



        Public Overrides Sub Cleanup()
            ' Clean up if needed
            MyBase.Cleanup()
        End Sub

    End Class

End Namespace
